package com.zcsy.manage.model.mall.vo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import com.zcsy.manage.model.mall.ShoppingCart;

/**
 * 购物车信息显示视图
 * @Title: ShoppingCartVo.java
 * @Package： com.zcsy.manage.model.mall.vo 
 * @author hubing
 * @Copyright: 2016 武汉恒数利通软件有限公司 All rights reserved.
 * @date 2016年8月2日
 * @version 1.0
 * @see JDK1.7.0_75
 * @since
 */
public class ShoppingCartVo {
    
    private String shopId;
    private String shopName;
    private List<ShoppingCart> goodsList;
    
    private BigDecimal carriage;
    
    /**
     * 店铺订单金额
     */
    private BigDecimal subTotal;
    
    /**
     * 减免金额界限
     */
    private BigDecimal derateLine;
    
    /**
     * 减免后运费金额
     */
    private BigDecimal derateCarriage;
    
    /**
     * 减免金额
     */
    private BigDecimal derateAmount;
    /**
     * 店铺优惠券
     */
    
    
    public ShoppingCartVo() {
        super();
    }
    
    public ShoppingCartVo(ShoppingCart cart) {
        super();
        this.shopId = cart.getShopId();
        this.shopName = cart.getShopName();
        
        this.goodsList = new ArrayList<ShoppingCart>();
        this.goodsList.add(cart);
    }
    
   
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public List<ShoppingCart> getGoodsList() {
        return goodsList;
    }
    public void setGoodsList(List<ShoppingCart> goodsList) {
        this.goodsList = goodsList;
    }

    public BigDecimal getCarriage() {
        return carriage;
    }

    public void setCarriage(BigDecimal carriage) {
        this.carriage = carriage;
    }

    public BigDecimal getSubTotal() {
        return subTotal;
    }

    public void setSubTotal(BigDecimal subTotal) {
        this.subTotal = subTotal;
    }

    public BigDecimal getDerateCarriage() {
        return derateCarriage;
    }

    public void setDerateCarriage(BigDecimal derateCarriage) {
        this.derateCarriage = derateCarriage;
    }

    public BigDecimal getDerateLine() {
        return derateLine;
    }

    public void setDerateLine(BigDecimal derateLine) {
        this.derateLine = derateLine;
    }

    public BigDecimal getDerateAmount() {
        return carriage.subtract(derateCarriage);
    }

    public void setDerateAmount(BigDecimal derateAmount) {
        this.derateAmount = derateAmount;
    }
    
}
